feat(ai): add pipeline driver skill (plan/implement/review) - #16
Open
ci wants to merge 1 commit into
Open
Conversation
Owner
Author
|
This PR is part of a stack:
Created with jjpr |
ci
force-pushed
the
feat/ai-pipeline-skill
branch
from
September 3, 2026 00:11
8ec65fc to
9217a3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Multi-stage work (investigate/plan, implement, review-fix loop) has only been orchestrated by prompts (
$pr-closeout,lfg-style skills), which do not hold gates and are tied to one harness. The goal is a deterministic driver that works the same whether the main agent is Claude Code, Codex, or Amp, runs each stage on a chosen headless engine, and returns control to the main agent between stages.Changes
New
pipelineskill (modules/ai/skills/pipeline, profilecoding):scripts/pipeline: stdlib-only driver withnew,plan,implement,review,run [--until],status,summary,reject. Each stage is one fresh engine process (codex,claude, orgrok) with a JSON schema; results steer control flow. Exit codes:0done,1error,3needs the main agent.newvalidates flags and the autoreview helper before creating an isolated jj workspace or git worktree (or checks that--workspacebelongs to the repo). Runs live under~/.local/state/pipeline/<run>withtask.md,plan.md/json,implement.json,review-N.json,fix-N.json,summary.md, prompts, and full engine logs.read-onlysandbox; claude plan mode with read tools, no user MCP servers; grok--toolsallowlist plus MCP meta-tool deny). Every write stage refuses to start on a dirty workspace. Implement/fix run with bypass inside the isolated checkout, as in$codex-first. Codex runs--ephemeral; grok sessions are preassigned and deleted afterwards.autoreview --reviewers ...(defaultcodex,grok) on the frozen branch, then a fix round (fix(review):commits), re-review.--max-rounds(5) caps fix rounds, not reviews, so a rerun after the main agent's own fixes can still confirm clean. Implementer rejections carry their reason into the next review prompt; a finding surviving two fix rounds halts;pipeline rejectrecords the main agent's own rejection. Round and survival counters persist only after a fix completes.open_questions; implement/fixquestion|blocked|scope_change; failing tests; done without a new commit; dirty workspace after a stage; incorrect verdict without findings; round cap.runresumes from the last completed stage and retries the halted one.claude:fable:high(fable= latest Fable alias, 5.1 today) in plan mode, implementcodex:gpt-5.6-sol:high, reviewcodex:gpt-5.6-sol:xhigh,grok:grok-4.6:xhigh; inside an Amp orb the review default is the same panel through amp (amp:openai/gpt-5.6-sol:xhigh,amp:xai/grok-4.6:xhigh).summarytemplatessummary.mdfrom the artifacts with no LLM call.prompts/*.md;SKILL.mddocuments the contract;skill-overrides.jsonpublishes it to the coding profile.Tests
uvx pytest -qand the CLI works.fix(review)commit -> clean; already-addressed finding ->rejectedwithout commit -> clean.runskipped the completed plan and retried implement.--untilon completed stages, review-before-implement rejection, invalid engine leaves no workspace, workspace ownership for jj workspaces and git worktrees, sibling helper resolution through an installed symlink.make test(darwin build) passes with the new skill directory.autoreview --reviewers codex,grokon this change ran the full 5-round cap. Rounds 1-4 findings were all fixed. Round 5 reported 6 findings; 5 were fixed after the cap without a further review round (claude planner moved to plan mode without Bash allow-globs and with--strict-mcp-config; pre-stage dirty check for write stages; reviewer spec validated atnew; fix-round and survival counters persisted only after a completed fix), and 1 was rejected: "resume a halted fix before accepting a later clean review" is the main agent's job after a failing-test halt, now stated in SKILL.md. The last review round therefore has not been re-run; see the PR discussion if you want another pass.